<template>
    <div>
        <template v-for="(item, index) in names" :key="item">
            <slot :item="item" :index="index"></slot>
        </template>
    </div>
</template>

<script>
    export default {
        props: {
            names: {
                types: Array, 
                default() {
                    // 返回一个空的数组
                    return () => []
                }
            }
        }
    }
</script>

<style scoped>

</style>